home *** CD-ROM | disk | FTP | other *** search
- Path: lrz-muenchen.de!news
- From: Ralph Reichart <reichart@informatik.tu-muenchen.de>
- Newsgroups: comp.lang.c
- Subject: File problem with Watcom C/C++ 10.5
- Date: 7 Apr 1996 22:26:04 GMT
- Organization: Leibniz-Rechenzentrum, Muenchen (Germany)
- Distribution: world
- Message-ID: <4k9fds$4fs@sparcserver.lrz-muenchen.de>
- NNTP-Posting-Host: line6d.ppp.lrz-muenchen.de
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 1.22 (Windows; I; 16bit)
-
- hi,
-
- i have a big problem. i'm trying to open a file with fopen. the program
- looks like this:
-
- #include <stdlib.h>
- #include <stdio.h>
-
- main()
- {
- FILE *Datei;
-
- Datei = fopen("\autoexec.bat", "r");
- if (Datei == NULL)
- {
- printf("\nSHIT!!");
- exit(1);
- };
- fclose(Datei);
- }
-
- i'm sorry, but i can't open it. i always have the value -1 or 1 in errno.
- yes, the file exists, but it doesn't matter. it never works.
- can somebody please help me??
-
- ralphy
-
-
-